import request from "@/utils/request";

// 登录请求方法
// data ===> {mobile:xxx,password:xxx}
export function loginApi(data) {
  return request({
    url: "/sys/login",
    // ==> /api/sys/login
    // ==> http://ihrm-java.itheima.net/api/sys/login
    method: "post",
    data, // data: data,
  });
}

// 获取用户资料请求方法
export function getInfoApi() {
  return request({
    url: "/sys/profile",
    method: "post",
  });
}

// 获取员工基本信息
export const getUserInfoApi = (id) => {
  return request({
    url: "/sys/user/" + id,
    method: "get",
  });
};
